﻿namespace ConsoleApp5
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.Write("请输入学生成绩：");

            if (double.TryParse(Console.ReadLine(), out double score))
            {
              
                if (score < 0 || score > 100)
                {
                    Console.WriteLine("错误：成绩必须在0-100之间");
                    return;
                }

                
                char grade;
                if (score >= 90)
                {
                    grade = 'A';
                }
                else if (score >= 60)
                {
                    grade = 'B';
                }
                else
                {
                    grade = 'C';
                }

                Console.WriteLine($"成绩等级：{grade}");
            }
            else
            {
                Console.WriteLine("输入无效，请输入一个有效的数字。");
            }
        }
    }
}
